<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMerchantCustomerTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('merchant_customer', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('merchant_id')  ->comment('商户id');
            $table->integer('user_id')      ->default(0)->comment('用户id');
            $table->string('phone')         ->comment('用户手机号');
            $table->string('name')          ->comment('客户别名');
            $table->string('remark')        ->comment('备注');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('merchant_customer');
    }
}
